<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div>1</div>
    <div id="one">2</div>
    <div>3</div>
    <div class="aa">4</div>
    <div class="aa">5</div>
    <div class="aa">6</div>
</body>
    <script src="js/jquery-3.7.1.js" type="text/javascript" charset="utf-8"></script>
    <script>
        //根据下标来截取 包头不包尾
       $("div").slice(3,5).css("color","red");
    </script>
</html>